using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class TPI_AcctMatchMap : EntityTypeConfiguration<TPI_AcctMatch>
    {
        public TPI_AcctMatchMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Acct)
                .HasMaxLength(40);

            this.Property(t => t.ExtAcct)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("TPI_AcctMatch");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Interface).HasColumnName("Interface");
            this.Property(t => t.Acct).HasColumnName("Acct");
            this.Property(t => t.ExtAcct).HasColumnName("ExtAcct");
        }
    }
}
